// import svgIcon from './svg-icon/index.vue'
// import popup from './popup/index.vue'
import {defineAsyncComponent} from "vue";
export { MineConfirm } from './confirm'
export { MineMessage} from './message'

export default {
    install(app) {
        // app.component('mine-svg-icon', svgIcon)
        // app.component('mine-popup', popup)

        //获取当前路径下所有文件夹中的index.vue
        const components = import.meta.glob('./*/index.vue')
        //遍历获取到的组件模块
        for (const [fullPath, fn] of Object.entries(components)) {
            const componentName = `mine-${fullPath.replace('./', '').split('/')[0]}`
            app.component(componentName,defineAsyncComponent(fn))
        }
    }
}